package cn.wtg.kotlindemo

import android.os.Bundle
import cn.wtg.kotlinlib.baseUi.BaseBindingActivity
import cn.wtg.kotlindemo.databinding.ActivityMainBinding
import cn.wtg.kotlindemo.testBinding.BindingActivity
import cn.wtg.kotlindemo.testDatabinding.TestDataBindActivity
import cn.wtg.kotlindemo.testMvvm.MvvmActivity
import cn.wtg.kotlindemo.testRxjava3.TestRxjavaActivity
import cn.wtg.kotlindemo.testSingleActivityMulFragment.SingleMulFragmentActivity
import com.blankj.utilcode.util.ActivityUtils

class MainActivity : BaseBindingActivity<ActivityMainBinding>() {

    override fun getLayoutRes(): Int {
        return R.layout.activity_main
    }

    override fun initView(savedInstanceState: Bundle?) {
        binding?.tvBinding?.setOnClickListener {
            ActivityUtils.startActivity(BindingActivity::class.java)
        }

        binding?.tvMvvm?.setOnClickListener {
            ActivityUtils.startActivity(MvvmActivity::class.java)
        }

        binding?.tvSingleActivityMulFragment?.setOnClickListener {
            ActivityUtils.startActivity(SingleMulFragmentActivity::class.java)
        }
        binding?.tvDatabindingAdapter?.setOnClickListener { 
            ActivityUtils.startActivity(TestDataBindActivity::class.java)
        }
        binding?.tvRxjava?.setOnClickListener {
            ActivityUtils.startActivity(TestRxjavaActivity::class.java)
        }
    }
}